﻿using UnityEngine;
using System.Collections;

public class OtherBgMove : MonoBehaviour {

    public float speed = 3f;
    public HgOffect hgOffect;

	void Start () {
	
	}
	
	
	void Update () {

        if (transform.position.x <= -15)
        {
            transform.position = new Vector3(14.5f, 1, 0);
            Debug.Log("1111");
            hgOffect.RangeHG();
        }
        transform.Translate(Vector3.left * speed * Time.deltaTime, Space.Self);
      

	}
}
